UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FPPlDosj0CGEN4d/W/nK7te5PfSAs2S2hDzfhHNKBB0=' 
WHERE 
  key_id = 'dba9be4bd956275db59b077c2046a35e32d063f6eaece972ac627b95ef4cabdf' 
  AND (
    token = 'FPPlDosj0CGEN4d/W/nK7te5PfSAs2S2hDzfhHNKBB0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027