UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1xNPKMuOTA3RGq1z7S3s4gO3CkV7vHLutdu29NsM6BY='
WHERE
key_id = '2f0c824fe47b02e72615cb3d774898ca03ba050c81efe80d1fbcfd5b571ec697'
AND (
token = '1xNPKMuOTA3RGq1z7S3s4gO3CkV7vHLutdu29NsM6BY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)