UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'drgTWxVKtYuRbd3fQWaOztJSwQKxdD6ChoaNsv8wIKQ='
WHERE
key_id = '2744b2e6db6bc24c69aba1d8a9cc661565c9c045eb0e39c1ada38a7b5cd088cb'
AND (
token = 'drgTWxVKtYuRbd3fQWaOztJSwQKxdD6ChoaNsv8wIKQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)