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