UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'cxbokSlv6p6Pa1wqQfjU+RRe54wC5tsQRuVVw26zMyI=' 
WHERE 
  key_id = '550728cbbbdcc9764b0aa7013f3476d924eea3ceb50dccce09d93d1e1eb380b1' 
  AND (
    token = 'cxbokSlv6p6Pa1wqQfjU+RRe54wC5tsQRuVVw26zMyI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033