UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/utAJxhxjZgq9P5H+16MJ2kTgXJPKgE2m5WhFvEkctg='
WHERE
key_id = '61c42d48537babd70614bdff3caaf533c20972973f310eb2f1b96901dab99da0'
AND (
token = '/utAJxhxjZgq9P5H+16MJ2kTgXJPKgE2m5WhFvEkctg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)