UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'asg2gqM0pisAU22CtQfSjfs+4tFAQNCsOCY6VAaxyrM='
WHERE
key_id = 'f51aa3db47405060771c018531fdc35022f5288b69d4d763393635144652e816'
AND (
token = 'asg2gqM0pisAU22CtQfSjfs+4tFAQNCsOCY6VAaxyrM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)