UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QSyVAMkgg/xmyUKNO4WDmaiS6qKzLaP5rKpHnC9bJP0='
WHERE
key_id = '92ce660af386c70f1fed7e35b30b3c961f5302958d863d85848bc51fb4475a68'
AND (
token = 'QSyVAMkgg/xmyUKNO4WDmaiS6qKzLaP5rKpHnC9bJP0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)