UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lOwRU/oz8Y3NriGT41AxJVwE1Wx3NR/3Mmku7fDvMiU='
WHERE
key_id = '1f5bd7615176015ebbbbb78c81c81a1d76f58587196ac9aeef86da19ae97b23e'
AND (
token = 'lOwRU/oz8Y3NriGT41AxJVwE1Wx3NR/3Mmku7fDvMiU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)