UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PKc15beoM4RoSzl0f7Qif0RhR25a8sJNw/6OfLtzoXw='
WHERE
key_id = '2dcaa36cb031618c8f765ff3aab98e5ab22b2c513cd918a3d9b0f411764f2c72'
AND (
token = 'PKc15beoM4RoSzl0f7Qif0RhR25a8sJNw/6OfLtzoXw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)