UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3A9YYIndMgxbgXOVSXUqGvIrTQ41vtfJWIC6ETow8FQ='
WHERE
key_id = '5b33868a29a5d5c2bbeee307c7db6040a2d062231ae94ad48eafd8e632b5da56'
AND (
token = '3A9YYIndMgxbgXOVSXUqGvIrTQ41vtfJWIC6ETow8FQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)