UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uWCCUkoSARLFYQt/B+SJNAVHuNcgmy9FDt/879Uh4yE='
WHERE
key_id = '723eedc35c58f91fb911de5fcef40413c762af9ee540ced8887a1b72dbc62c0d'
AND (
token = 'uWCCUkoSARLFYQt/B+SJNAVHuNcgmy9FDt/879Uh4yE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)