UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GOKo1l2N8nEs6hh+B8f5/srWHKJGyln6q8vcnLh7D38='
WHERE
key_id = 'febcab4eb69445e7b0dbaa125371784edbe5436b90fcaea5cb7c921105f1c36c'
AND (
token = 'GOKo1l2N8nEs6hh+B8f5/srWHKJGyln6q8vcnLh7D38='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)