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