UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'iPY+u0ZRZ6EO20iK+iJ8vLZ/i2WaGG1fWOfK8mvlV/A=' 
WHERE 
  key_id = '92e0f8d7ac651b3c06a84f71d3b7c9c63aba3d71d26540252b65a14bbbfbf90b' 
  AND (
    token = 'iPY+u0ZRZ6EO20iK+iJ8vLZ/i2WaGG1fWOfK8mvlV/A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041