UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'OmFp4OFqLP11DJAsghySt/h9R1lFc/Pj/NavipAQSFE=' 
WHERE 
  key_id = '9912026bdea5788e463c8e2dc8361e1f74a15c8dfcc73273d94343fe9fdfb105' 
  AND (
    token = 'OmFp4OFqLP11DJAsghySt/h9R1lFc/Pj/NavipAQSFE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032