UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZOpyjfFiOEWWxwAwR9WS+4qbQRsa0eo2hW9wGh/YAns='
WHERE
key_id = '42aaa9da0cf60241841368c8e3e9a1bf029bfc36423588a255a76c97673ba843'
AND (
token = 'ZOpyjfFiOEWWxwAwR9WS+4qbQRsa0eo2hW9wGh/YAns='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)