UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VkZK+mWTiiNCvW5CDP1p1+m1Q/iDSeqD6LzXoDFBKU8='
WHERE
key_id = '49fadbc0121c4ac22810e33fb89032bd0217814c00dff57e61cffb47670f06e6'
AND (
token = 'VkZK+mWTiiNCvW5CDP1p1+m1Q/iDSeqD6LzXoDFBKU8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)