UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jT63ip4KOHo64Q+VjuxlJDlXBcfl7gHsHRg3tefybD4=' 
WHERE 
  key_id = '1febcaf9753708de42627a24161315aaed3b8efb68909e98c7ded0fd7a10bb49' 
  AND (
    token = 'jT63ip4KOHo64Q+VjuxlJDlXBcfl7gHsHRg3tefybD4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00049