UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '92P1K1V4T+MR+c1xYuhfVeUt7I9/ueaQ4WE9w/UOH5w='
WHERE
key_id = '8dd244a7fedd94cb86cdc6fcdd74551235e61964f6f3644c99c6c88d421a9b02'
AND (
token = '92P1K1V4T+MR+c1xYuhfVeUt7I9/ueaQ4WE9w/UOH5w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)