UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CjsdEOk5l/+haEJKrXB/fkr5DwLZAOVIPyk0EQKDHIw='
WHERE
key_id = 'f03364255ae00a2d9dbe182fcb4e8a9c28b1dae2f27eb992e8af38435f50b60a'
AND (
token = 'CjsdEOk5l/+haEJKrXB/fkr5DwLZAOVIPyk0EQKDHIw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)