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