UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'atpyfugjiYH/YopM2mvxkRtFwVA/4dmHWqraSLR5oJw=' 
WHERE 
  key_id = 'cdb2c25f71925bf5e78983379c82644ab28fb77ce2f8ba22401e37a770f5a38b' 
  AND (
    token = 'atpyfugjiYH/YopM2mvxkRtFwVA/4dmHWqraSLR5oJw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033