UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Zsspffl+JyoUnKUjOO+wPb5DicrBRnFWj09MjZBRLKY=' 
WHERE 
  key_id = '2af4a8137bc3d5fe86486a32d3ffc5fabbd611a1e48fa92952b528385a421ee3' 
  AND (
    token = 'Zsspffl+JyoUnKUjOO+wPb5DicrBRnFWj09MjZBRLKY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016