UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OogCZr9G82YkrBE/Gu1FNzaSDNObbDpGzApOwfSNaos='
WHERE
key_id = '2426fa8b6bab4ad12bd982c53b9e72ae7a8c53c6f0e9c9361df8c5d2ebe5c87d'
AND (
token = 'OogCZr9G82YkrBE/Gu1FNzaSDNObbDpGzApOwfSNaos='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)