UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 's2Kzj5Pe1PB3kGfNUbq/efDJuzZoMAvCF7POl1XWymM=' 
WHERE 
  key_id = '949ffa6cc9f8f2bc486644a2d1d0482134b38b0834b80502713f81fb1c62dfeb' 
  AND (
    token = 's2Kzj5Pe1PB3kGfNUbq/efDJuzZoMAvCF7POl1XWymM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027