UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Zqv1O93bpTGJkI4s3+GsMpfhNsIo9qoSbf4E0WGAti0=' 
WHERE 
  key_id = 'f67dbbeb9c0abd01c111a9f3687d959c1c98d137bb90ce5bb314f7f9d2b760fe' 
  AND (
    token = 'Zqv1O93bpTGJkI4s3+GsMpfhNsIo9qoSbf4E0WGAti0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029