UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MWHutTibUNZLgSBcp+O8uEQMrzHlLKZ+juLjGpvmnDo='
WHERE
key_id = '03e516ec960d656266d1b42ca44760024edcdb0cb51cc95c91372d9b6eaa3ea7'
AND (
token = 'MWHutTibUNZLgSBcp+O8uEQMrzHlLKZ+juLjGpvmnDo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)