UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'SvMSE5nrPwtynH0Fj+aF2iQCXYZ94hprA7ycHKdWLrA=' 
WHERE 
  key_id = 'a2a3e52e85fc6d961beb65ad318415cecc225dd36ed0382444ed7192fea10cf3' 
  AND (
    token = 'SvMSE5nrPwtynH0Fj+aF2iQCXYZ94hprA7ycHKdWLrA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027