UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3RL/c07Rq6byYKtR6CGM1FGKVcsu8VV3tXz6/djSxDA='
WHERE
key_id = 'a03c53631c31aa90c6cc235400a247be56d4a818584d74fcdb17c9a99fa0fa3c'
AND (
token = '3RL/c07Rq6byYKtR6CGM1FGKVcsu8VV3tXz6/djSxDA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)