UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'JauxNIBHp/pFwUUsOS76oFmJkWZGgM3M29T0Yk5jQCY=' 
WHERE 
  key_id = '456e482f12301fe4e63113cb674a4a684585a15d2ff6fcdb903ea8efba93ad08' 
  AND (
    token = 'JauxNIBHp/pFwUUsOS76oFmJkWZGgM3M29T0Yk5jQCY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034