UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'AFa+2UUqSfPybCdGcr7RwMfUC3eusRsM7/Yv9O9cl/g=' 
WHERE 
  key_id = '733e02ab066a8d74222bc5992a22b69da6579153acf98db2d26f989c9ddd2bed' 
  AND (
    token = 'AFa+2UUqSfPybCdGcr7RwMfUC3eusRsM7/Yv9O9cl/g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035