UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BZRXQUfBaqg/DSsgo2h+gkDvWvb53XQfJIlB708gIr8='
WHERE
key_id = 'adefac64703ef7fb604d8c3f9514e89d1c4072afa958bc16e367ac36f87253a3'
AND (
token = 'BZRXQUfBaqg/DSsgo2h+gkDvWvb53XQfJIlB708gIr8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)