UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9lARZDEZd1UA2kLQKM0nWc4x7/TEWSl2pxPQ5HrCf6I='
WHERE
key_id = '660d496d530a4226f008ac3ced6710389c29975e3cccae488feac90eba00d1c6'
AND (
token = '9lARZDEZd1UA2kLQKM0nWc4x7/TEWSl2pxPQ5HrCf6I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)