UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mVC3DrzB50DrxD3paeJF1+7hxLxUIIph24UBPwst4D8='
WHERE
key_id = 'f08136e7e4f7026686bf8c25371ddeb04a3820b4d07e9bb0983844395e6fec88'
AND (
token = 'mVC3DrzB50DrxD3paeJF1+7hxLxUIIph24UBPwst4D8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)