UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EIrTsepuaAUGxuqg66DXoJPZwlJP3d6hUpD3erWCYFU='
WHERE
key_id = 'c885a1a69c6964863060f63d3124ebbb89cc8de9e66bdcf24c0239eb88e53e93'
AND (
token = 'EIrTsepuaAUGxuqg66DXoJPZwlJP3d6hUpD3erWCYFU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)