UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/ZUwQxAo/YXq2cmFYmlkKylLTo/++hdv/QDFELoBEDs='
WHERE
key_id = '060fc4f1d21f006ff06c9572d6661696de4e4c311702637b154d96ad7ed054a6'
AND (
token = '/ZUwQxAo/YXq2cmFYmlkKylLTo/++hdv/QDFELoBEDs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)