UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'y/j+6jg7GeWaMXU01vq62iwUzOJGKm0Ck05DBVNrIk4='
WHERE
key_id = '72456e1c98621b81d51928bd7eff167bbe7fc4510af7e60200d9b0979599189a'
AND (
token = 'y/j+6jg7GeWaMXU01vq62iwUzOJGKm0Ck05DBVNrIk4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)