UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/bO59TiSdJuFFLwOMmQTXbhcg9+Vte1JNGJFRBl8KzU='
WHERE
key_id = 'f82904a5d2f1f4432cb4707b4db9d8fea6a2cdb8c31f9b52b6aac3e50f504ba3'
AND (
token = '/bO59TiSdJuFFLwOMmQTXbhcg9+Vte1JNGJFRBl8KzU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)