UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mv8NcC6nn4lR6D2szq5aPvEM35B5/btMhSMUdBelVPY='
WHERE
key_id = '33f06e199c827cbeea8321feb34716437c226e1d715f4852a33125a69e88f3da'
AND (
token = 'mv8NcC6nn4lR6D2szq5aPvEM35B5/btMhSMUdBelVPY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)