UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'yxquK3RfsZLPcsaIaDu+Yi02K/AdYRILoMsSGPMWTNQ=' 
WHERE 
  key_id = 'ffdaed95d65644133776afb94e5d335ddf825849196ce3825facafa5cb222893' 
  AND (
    token = 'yxquK3RfsZLPcsaIaDu+Yi02K/AdYRILoMsSGPMWTNQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028